﻿$.Pop = function (src, title, width, height, cancelfunc) {
    width = width ? width : 750;
    height = height ? height : 478;
    var titleBar = $('<div id="modual_Title"><span style="float:left;">' + title + '</span></div>').append($('<a href="#" class="close"/>').click(function () {
        $.unblockUI();
        if ($.isFunction(cancelfunc)) {
            cancelfunc();
        }
        return false;
    }));
    var frmCon = $('<iframe id="modual_Cnt" src="" frameborder="0" width="100%"; height="' + height + '" scrolling="no" noresize="noresize"/>').attr("src", src);
    var wrap = $('<div id="modual_Wrapper"/>');
    $.blockUI({
        message: wrap.append(titleBar, frmCon),
        css: {
            border: 'none',
            height: height + 'px',
            width: width + 'px',
            top: ($(window).height() - height) / 2 + 'px',
            left: ($(window).width() - width) / 2 - 30 + 'px',
            cursor: 'default'
        },
        overlayCSS: {
            backgroundColor: '#fff',
            opacity: 0.3
        }

    });
    //$('.blockPage').draggable();    
    return false;
}
